<?php
	require_once ('../businessObjects/userAccount.php');
	$username = $_SESSION['username'];
	$user = new userAccount();
	$message = '';
	if ($user->userAccountInformation($username)){
		echo 'hola';
		$userInfo = mysqli_fetch_array($user->resultSet(),MYSQLI_ASSOC);		
	}else{
		$message = $user->message();
	}
?>
<form id="frmUpdateAccount" action="?action=USERACCOUNTUPDATE" method="post" enctype="application/x-www-form-urlencoded">
<h1> Employee Information </h1>
	<div class="frmContainer" style="width:50%">
    	<div class="frmRow">
        	<div class="frmLabelCell">Dependency</div>
            <div class="frmContentCell"><?=$userInfo['enterpriseName']?></div>
        </div>
		<div class="frmRow">
        	<div class="frmLabelCell">Name</div>
            <div class="frmContentCell"><?=$userInfo['lastName'].' , '.$userInfo['firstName']?></div>
        </div>
    </div>
<h1> Account Information </h1>
	<div class="frmContainer" style="width:50%">
    	<div class="frmRow">
        	<div class="frmLabelCell">Username</div>
            <div class="frmContentCell"><?=$userInfo['username']?></div>
        </div>
		<div class="frmRow">
        	<div class="frmLabelCell">Old Password</div>
            <div class="frmContentCell"><input type="password" id="txtOldPassword" name="txtOldPassword" class="controlTextBox" /></div>
        </div>
        <div class="frmRow">
        	<div class="frmLabelCell">New Password</div>
            <div class="frmContentCell"><input type="password" id="txtNewPassword1" name="txtNewPassword1" class="controlTextBox" /></div>
        </div>
        <div class="frmRow">
        	<div class="frmLabelCell">Confirm Password</div>
            <div class="frmContentCell"><input type="password" id="txtNewPassword2" name="txtNewPassword2" class="controlTextBox" /></div>
        </div>
        <div class="frmRow">
        	<div class="frmLabelCell"><br /></div>
            <div class="frmContentCell"><input type="submit" id="bntSubmit" name="bntSubmit" class="controlSubmit" value="Update" /></div>
        </div>
    </div>
</form>